from wheels.pi.aio.Reactor import Reactor
from wheels.pi.aio.AsyncProcessor import AsyncProcessor


_reactor = Reactor.create()
_processor = AsyncProcessor(_reactor)


def register(op, proactor, handler):
    _processor.register(op, proactor, handler)


def main():
    while True:
        _reactor.run(False)


def flush():
    _reactor.run(False)
